home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / interapplication comm / menuscripter / sources / msdrag.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.4 KB  |  72 lines

  1. // SVDrag.c
  2. //
  3. // Original version by Jon Lansdell and Nigel Humphreys.
  4. // 4.0 and 3.1 updates by Greg Sutton.
  5. // Drag Manager support by Chris White
  6. // ©Apple Computer Inc 1996, all rights reserved.
  7.  
  8. #pragma once
  9.  
  10. #include <Types.h>
  11. #include <Drag.h>
  12.  
  13. #include "MSGlobals.h"
  14.  
  15.  
  16. pascal OSErr MyTrackingHandler ( DragTrackingMessage theMessage, WindowPtr theWindow,
  17.                                     void* handlerRefCon, DragReference theDrag );
  18.  
  19. pascal OSErr MyReceiveHandler  ( WindowPtr theWindow, void* handlerRefCon, 
  20.                                 DragReference theDrag );
  21.  
  22. OSErr InitDragHandlers ( void );
  23.  
  24. OSErr InstallDragHandlers ( WindowPtr theWindow );
  25.  
  26. void RemoveDragHandlers ( WindowPtr theWindow );
  27.  
  28. Boolean IsDragInWindowContent ( DragReference theDrag, WindowRef theWindow );
  29. Boolean PtInWindow ( Point localPt, WindowRef theWindow );
  30. Boolean PtInDocument ( Point localPt, DPtr theDocument );
  31.  
  32. Boolean IsMouseInContentRgn ( DragReference theDrag, WindowPtr theWindow );
  33.  
  34. Boolean CanAcceptDragItems ( DragReference theDrag, WindowPtr theWindow );
  35.  
  36. OSErr GetSelectedText ( DPtr theDocument, Ptr dataPtr, short* dataSize );
  37.  
  38. void GetSelectedTextRgn ( DPtr theDocument, RgnHandle dataRgn );
  39.  
  40. Boolean IsMoving ( DragReference theDrag );
  41.  
  42. void OutlineRegion ( RgnHandle theRgn );
  43.  
  44. OSErr DoWindowContentDrag ( WindowPtr theWindow, EventRecord* theEvent );
  45.  
  46. static Boolean DragIsNotInSourceWindow ( DragReference theDrag );
  47.  
  48. Boolean UserWantsToDrag ( WindowRef theWindow, Point globalPt );
  49. Boolean PointInWindowSelection ( Point localPt, WindowRef theWindow );
  50. static Boolean IsDragMoving ( DragReference theDrag );
  51. static Boolean IsDragWithOptionKey ( DragReference theDrag );
  52.  
  53. void LocalRgnToGlobalRgn ( RgnHandle theRgn, WindowRef theWindow );
  54. void LocalRectToGlobalRect ( Rect* theRect, WindowRef theWindow );
  55.  
  56. short HitTest(Point theLoc, DPtr* theDoc);
  57. void DrawCaret(short offset, TEHandle theTE);
  58. char GetCharAtOffset(short offset, TEHandle theTE);
  59. Boolean WhiteSpace(char theChar);
  60. Boolean WhiteSpaceAtOffset(short offset, TEHandle theTE);
  61. void InsertTextAtOffset(short offset, char *theBuf, long size, StScrpHandle theStyl, TEHandle theTE);
  62.  
  63. Boolean IsOffsetInSelection ( short theOffset, TEHandle theTE );
  64.  
  65.  
  66. short TEIsFrontOfLine ( short offset, TEHandle theTE );
  67. short TEGetLine ( short offset, TEHandle theTE );
  68.  
  69. void DeleteTextSelection ( TEHandle theTE, short* theInsertPosition );
  70.  
  71. Boolean DropLocationIsFinderTrash ( AEDesc* dropLocation );
  72.